import http from '@/utils/httpUtils'

/**
 * @获取菜单树
 */
export function getMenuTree(query){
    return http('/system/menu/menuTree','get',query);
}

/**
 * @新增菜单
 */
export function addMenuApi(query){
    return http('/system/menu/addMenu','post',query)
}

/**
 * @修改菜单
 */
export function updateMenuApi(query){
    return http('/system/menu/updateMenu','post',query)
}

/**
 * @删除菜单 
 */
export function deleteMenuApi(menuId){
    let url = `/system/menu/deleteMenu/${menuId}`
    return http(url,'delete')
}

/**
 * @菜单是否可用
 */
export function menuIsEnable(menuId,isEnable){
    return http(`/system/menu/menuIsEnable/${menuId}/${isEnable}`,'put')
}